This invention relates to real-time computer image generation systems and, more particularly, to Aa system for texture mapping, including selecting an appropriate level of detail (LOD) of stored information for representing an object to be displayed, texture compression and motion compensation.
In certain real-time computer image generation systems, objects to be displayed are represented by convex polygons which may include texture information for rendering a more realistic image. The texture information is typically stored in a plurality of two-dimensional texture maps, with each texture map containing texture information at a predetermined level of detail (xe2x80x9cLODxe2x80x9d) with each coarser LOD derived from a finer one by filtering as is known in the art. Further details regarding computer image generation and texturing, can be found in U.S. Pat. No. 4,727,365 which is incorporated herein by reference thereto.
Color definition is defined by a luminance or brightness (Y) component, an in-phase component (I) and a quadrature component (Q) and which are appropriately processed before being converted to more traditional red, green and blue (RGB) components for color display control. Scaling and redesigning YIQ data, also known as YUV, permits representation by fewer bits than a RGB scheme during processing. Also, Y values may be processed at one level of detail while the corresponding I and Q data values may be processed at a lesser level of detail. Further details can be found in U.S. Pat. No. 4,965,745, incorporated herein by reference.
U.S. Pat. No. 4,985,164, incorporated herein by reference, discloses a full color real-time cell texture generator uses a tapered quantization scheme for establishing a small set of colors representative of all colors of a source image. A source image to be displayed is quantitized by selecting the color of the small set nearest the color of the source image for each cell of the source image. Nearness is measured as Euclidian distance in a three-space coordinate system of the primary colors: red, green and blue. In a specific embodiment, an 8-bit modulation code is used to control each of the red, green, blue and translucency content of each display pixel, thereby permitting independent modulation for each of the colors forming the display image.
In addition, numerous 3D computer graphic systems provide motion compensation for DVD playback.
In accordance with the present invention, the rate of change of texture addresses when mapped to individual pixels of a polygon is used to obtain the correct level of detail (LOD) map from a set of prefiltered maps. The method comprises a first determination of perspectively correct texture address values found at four corners of a predefined span or grid of pixels. Then, a linear interpolation technique is implemented to calculate a rate of change of texture addresses for pixels between the perspectively bound span corners. This linear interpolation technique is performed in both screen directions to thereby create a level of detail value for each pixel.
The YUV formats described above have Y components for every pixel sample, and UN (they are also named Cr and Cb) components for every fourth sample. Every UN sample coincides with four (2xc3x972) Y samples. This is identical to the organization of texels in U.S. Pat. No. 4,965,745 xe2x80x9cYIQ-Based Color Cell Texturingxe2x80x9d, incorporated herein by reference. The improvement of this algorithm is that a single 32-bit word contains four packed Y values, one value each for U and V, and optionally four one-bit Alpha components:
YUVxe2x80x940566: 5-bits each of four Y values, 6-bits each for U and V
YUVxe2x80x941544: 5-bits each of four Y values, 4-bits each for U and V, four 1-bit Alphas
These components are converted from 4-, 5-, or 6-bit values to 8-bit values by the concept of color promotion.
The reconstructed texels consist of Y components for every texel, and UN components repeated for every block of 2xc3x972 texels.
The combination of the YIQ-Based Color Cell Texturing concept, the packing of components into convenient 32-bit words, and color promoting the components to 8-bit values yields a compression from 96 bits down to 32 bits, or 3:1.
There is a similarity between the trilinear filtering equation (performing bilinear filtering of four samples at each of two LODs, then linearly filtering those two results) and the motion compensation filtering equation (performing bilinear filtering of four samples from each of a xe2x80x9cprevious picturexe2x80x9d and a xe2x80x9cfuture picturexe2x80x9d, then averaging those two results). Thus some of the texture filtering hardware can do double duty and perform the motion compensation filtering when those primitives are sent through the pipeline. The palette RAM area is conveniently used to store correction data (used to xe2x80x9ccorrectxe2x80x9d the predicted images that fall between the xe2x80x9cIxe2x80x9d images in an MPEG data stream) since, during motion compensation the texture palette memory would otherwise be unused.